package net.alpcontrol.bi.colligation.service.impl;

import net.alpcontrol.bi.colligation.entity.HrmResource;
import net.alpcontrol.bi.colligation.mapper.HrmResourceMapper;
import net.alpcontrol.bi.colligation.service.IHrmResourceService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 丛庆
 * @since 2020-09-29
 */
@Service
@Transactional
public class HrmResourceServiceImpl extends ServiceImpl<HrmResourceMapper, HrmResource> implements IHrmResourceService {

    @Autowired
    private HrmResourceMapper hrmResourceMapper;

    /**
      *  分页查询
      * @param bootStrapTable
      * @param hrmResource
      * @return
      */
    @Override
    public IPage<HrmResource> selectPage(Page<HrmResource> page) {
        return hrmResourceMapper.selectPage(page,null);
    }

    @Override
    public List<Map> empList(String companyId) {
        Map param = new HashMap();
        param.put("companyId",companyId);
        return hrmResourceMapper.getEmpByName(param);
    }
}
